package com.sefon.smarteconomy.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import com.sefon.smarteconomy.dao.IProductManageDao;
import com.sefon.smarteconomy.domain.ProductManage;
import com.sefon.smarteconomy.service.IProductManageService;

/**
 * 
* Copyright: Copyright (c) 2018 SefonSoft
* 
* @ClassName: ProductManageServiceImpl.java
* @Description: 理财产品service接口实现类
*
* @version: v1.0.0
* @author: SF2170
* @date: 2018/03/26 22:07:28
* @by AnalysisExcel2File.java
*
 */
@Service
public class ProductManageServiceImpl implements IProductManageService {

	@Autowired
	private IProductManageDao productManageDao;
	
	/**
	 * 
	*
	* @return
	* @see com.sefon.smarteconomy.service.IProductManageService#queryList()
	*
	* Modification History:
	* Date         Author          Version            Description
	*---------------------------------------------------------*
	* 2018年03月26日     SF2170           v1.0.0             修改原因
	 */
 	@Cacheable
	@Override
	public List<ProductManage> queryList() {
		return productManageDao.findAll();
	}

	/**
	 * 
	*
	* @param productManage
	* @see com.sefon.smarteconomy.service.IProductManageService#save(com.sefon.smarteconomy.domain.ProductManage)
	*
	* Modification History:
	* Date         Author          Version            Description
	*---------------------------------------------------------*
	* 2018年03月26日      SF2170           v1.0.0               修改原因
	 */
	@Override
	public void save(ProductManage productManage) {
		productManageDao.save(productManage);
	}

	/**
	 * 
	*
	* @param id
	* @see com.sefon.smarteconomy.service.IProductManageService#deleteById(java.lang.String)
	*
	* Modification History:
	* Date         Author          Version            Description
	*---------------------------------------------------------*
	* 2018年03月26日     SF2170           v1.0.0               修改原因
	 */
	@Override
	public void deleteById(String id) {
		productManageDao.deleteById(id);
		
	}

	/**
	 * 
	*
	* @param id
	* @return
	* @see com.sefon.smarteconomy.service.IProductManageService#findById(java.lang.String)
	*
	* Modification History:
	* Date         Author          Version            Description
	*---------------------------------------------------------*
	* 2018年03月26日      SF2170           v1.0.0               修改原因
	 */
	@Override
	public ProductManage findById(String id) {
		return productManageDao.findOneById(id);
	}

}
